<template>
  <span class="settingStyle">
    <a-icon type="setting" style="font-size: 20px" @click="headerConfig"/>
    <set-table-header ref="tableHeaderModal" :tableHeaderModalVisible="tableHeaderVisible"
                      @closeTableHeaderModal="closeTableHeaderModal" :this-table-name="thisTableName"
                      :this-table-header-data="thisTableHeaderData"
                      :this-table-header-data-middel="thisTableHeaderDataMiddel"/>
  </span>
</template>
<script>
import setTableHeader from '@/components/setTableHeader/index'
  export default {
    props: {
      thisTableName: {
        type: String,
        default: '执行任务'
      },
      thisTableHeaderData: {
        type: Array,
        default: () => []
      },
      thisTableHeaderDataMiddel: {
        type: Array,
        default: () => []
      },
    },
    data() {
      return {
        tableHeaderVisible: false,
      }
    },
    components: {
      setTableHeader
    },
    methods: {
      headerConfig() {//开启表头设置弹框
        this.tableHeaderVisible = true
        // this.$refs.tableHeaderModal.init()//默认加载设置表头modal中的数据
      },
      closeTableHeaderModal() {//关闭表头设置弹框
        this.tableHeaderVisible = false
      },
    }
  }
</script>